<template>
	<view>
		<view class="" v-for="(item,index) in datalist" :key="index">
			<view class="">
				<text>{{item.title}}</text>
			</view>
			<view class="add">
				<text>发表时间:&nbsp;&nbsp;{{item.add_time|formatDate}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;浏览:&nbsp;&nbsp;{{item.click}}</text>
			</view>
			<rich-text :nodes="item.content"></rich-text>
		</view>
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				id:0,
				datalist:[]
			}
		},
		onLoad(item){
			this.id = item.id
			this.xuanran()
		},
		methods: {
			// 获取咨询详情数据
			async xuanran(){
				const {message} = await uni.$Http.get(`getnew/${this.id}`)
				this.datalist = message
				// console.log(message)
			}
		},
	}
</script>

<style>

</style>
